/*
 * @Author: ZephyrGao
 * @Date: 2024-02-18 11:33:47
 * @Description: 静态路由
 * Copyright (c) 2024 by ZephyrGao, All Rights Reserved. 
 */

import {RouteRecordRaw} from "vue-router";
import {
  LAYOUT,
  ABOUT_COMP,
  DASHBOARD_ANALYSIS_COMP,
  DASHBOARD_WORKBENCH_COMP,
} from "@/router/constant.ts";

const DASHBOARD: RouteRecordRaw = {
  path: '/dashboard',
  name: 'Dashboard',
  component: LAYOUT,
  redirect: '/dashboard/analysis',
  meta: {
    title: "面板",
  },
  
  children: [
    // 当 /dashboard 匹配成功
    // DASHBOARD_ANALYSIS_COMP 将被渲染到 LAYOUT 的 <router-view> 内部
    {
      path: 'analysis',
      name: 'Analysis',
      component: DASHBOARD_ANALYSIS_COMP,
      meta: {
        title: "分析",
      },
    },
    {
      path: 'workbench',
      name: 'Workbench',
      component: DASHBOARD_WORKBENCH_COMP,
      meta: {
        title: "工作台",
      },
    },
  ],
};

const ABOUT: RouteRecordRaw = {
  path: '/about',
  name: 'About',
  redirect: '/about/index',
  meta: {
    title: "关于",
  },
  children: [
    {
      path: 'index',
      name: 'AboutPage',
      component: ABOUT_COMP,
      meta: {
      },
    },
  ],
};


export const STATIC_ROUTES :RouteRecordRaw[]=  [DASHBOARD,ABOUT]